//
//  ViewController.m
//  2.buttons
//
//  Created by iD Student on 7/8/13.
//  Copyright (c) 2013 iD Student. All rights reserved.
//

#import "ViewController.h"

@interface ViewController ()

@end

@implementation ViewController


- (void)viewDidLoad
{
    [super viewDidLoad];
	// Do any additional setup after loading the view, typically from a nib.
    colorLabel.text = @"Color Name Will appear after button is pressed";
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

-(IBAction)changeBackgroundColor:(id)sender
{
    UIButton *button = (UIButton *)sender;
    if(button == redButton)
    {
        [self.view setBackgroundColor:[UIColor redColor]];
        colorLabel.text = @"Red";
    }
    else if(button == orangeButton)
    {
        [self.view setBackgroundColor:[UIColor orangeColor]];
        colorLabel.text = @"Orange";
    }
}


@end
